package com.example.service;

import com.example.entity.Cheng;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by Cheng on 2017/3/4.
 */
public interface TestService extends JpaRepository<Cheng,Integer>,JpaSpecificationExecutor<Cheng> {

    List<Cheng> findByAgeBetween(int age1, int age2);

    List<Cheng> findByNameContaining(String name);

    List<Cheng> findByNameNotLike(String name);

    List<Cheng> findByNameLike(String name);

    Cheng findByName(String name);


}


